score = float(input("Please enter score: "))

while score < 0 or score > 10:
    print("Invalid input. Try again.")
    score = float(input("Please enter score: "))


if score > 8:
    print("Your grade is A")
elif score > 6:
    print("Your grade is B")
elif score > 4:
    print("Your grade is C")
elif score > 2:
    print("Your grade is D")
else:
    print("Your grade is F")
